feat: add support for serverless v4 and typescript #1806
Merged
+32,821
−93,532
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When using Serverless v4 with TypeScript, the following error occurs:
You can reproduce this issue with the repository https://github.com/NicoHinderling/simple-serverless4-offline-example/tree/main
Fixes #1800
Motivation and Context
Serverless v4 supports TypeScript out of the box. To resolve the module loading issue, I have updated the UserFunction file and integrated tsx to execute TypeScript files.
How Has This Been Tested?
Unit tests and manually tested the helloTypescript endpoint locally using the test suite located at
tests/manual/nodejs